Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(dependencies): Adding ability to install nested dependencies #77

Merged
merged 6 commits into from
Oct 22, 2024

Conversation

IanWoodard
Copy link
Member

Fixes #65. Enables devservices to install recursive dependencies safely. It uses temp files and locks to avoid file contention and race conditions which occur when trying to install the same dependency multiple times at once. This actually happens quite often since both Relay and Snuba depend on Kafka, meaning there is a decent chance they will both try to install Kafka at similar times and likely run into a race condition if it weren't for the safeguards added. This change's locking behavior is a bit naive and could be further improved to simply avoid installing dependencies that have been or are currently installing, but as a first iteration, this gets the job done in a safe and robust way. Additionally, I opted to utilize the ~/.cache directory for storing the dependencies rather than the ~/.local/share.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 93.97590% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.90%. Comparing base (2e3e906) to head (10daf3a).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
devservices/utils/dependencies.py 90.90% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
+ Coverage   89.47%   90.90%   +1.43%     
==========================================
  Files          15       16       +1     
  Lines         589      649      +60     
==========================================
+ Hits          527      590      +63     
+ Misses         62       59       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IanWoodard IanWoodard merged commit e5e907b into main Oct 22, 2024
14 checks passed
@IanWoodard IanWoodard deleted the iw/nested-dep branch October 22, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge complex docker compose configs
2 participants